package com.example.building_material_mannager.controller;

import com.example.building_material_mannager.entity.Capaccount;
import com.example.building_material_mannager.service.CapaccountService;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class CapaccountController {
    @Resource
    CapaccountService capaccountService;

    //展示
    public void showCapaccount(Capaccount capaccount){

        List<Capaccount> capaccounts = capaccountService.showCapaccount(capaccount);
        System.out.println(capaccounts);
    }
    //增加
    public void addCapaccount(Capaccount capaccount){

        boolean re = capaccountService.addCapaccount(capaccount);
        System.out.println(re);
    }
    //刪除
    public void delCapaccount(Integer caid){

        boolean re = capaccountService.delCapaccount(caid);
        System.out.println(re);
    }
    //更新
    public void upCapaccount(Capaccount capaccount){

        boolean re = capaccountService.upCapaccount(capaccount);
        System.out.println(re);
    }
}
